/*
Arm Tracker and Glove Demo by Noah Zerkin (noazark AT gmail.com) 2009
Released under GNU GPLv3.0 http://www.opensource.org/licenses/gpl-3.0.html
*/

void accel()
{

boolean goodRead;
goodRead = false;

//----------Status Register-----------------------
  byte status;
  status = B00000000;
  //

//-------------------------------
  Wire.beginTransmission(i2cID);
  Wire.send(statusReg);
  Wire.endTransmission();

  Wire.requestFrom(i2cID, 1);
  if(Wire.available())
 {
   status = Wire.receive();
 }



//----------X Values-----------------------

//-------------------------------
  Wire.beginTransmission(i2cID);
  Wire.send(outXhigh);
  Wire.endTransmission();

Wire.requestFrom(i2cID, 1);
if(Wire.available())
 {
   x_val = Wire.receive();
 }


//----------Y Values-----------------------

//-------------------------------
  Wire.beginTransmission(i2cID);
  Wire.send(outYhigh);
  Wire.endTransmission();

Wire.requestFrom(i2cID, 1);
if(Wire.available())
 {
   y_val = Wire.receive();
 }

 //----------Z Values-----------------------

//-------------------------------
  Wire.beginTransmission(i2cID);
  Wire.send(outZhigh);
  Wire.endTransmission();

Wire.requestFrom(i2cID, 1);
if(Wire.available())
 {
   z_val = Wire.receive();
   goodRead=true;
   nextAccelRead = millis() + 20;
 }
//-------------------------------


 if (goodRead==true)
 {
   
 }
}
